@inherits BaseComponent

@namespace FluentCMS.Web.UI.Components

@if(Visible)
{
    <div @attributes="AdditionalAttributes"
         @ref="Element"
         class="@this.GetClasses()">
        <h2 class="@this.ClassName("AccordionHeader")">
            <button class="@this.ClassName("AccordionToggler")"
                    disabled="@Disabled"
                    type="button">
                <span>
                    @Summary
                </span>
                @if (Open)
                {
                    <Icon Name="IconName.AngleDown"
                          Size="IconSize.Large" />
                }
                else
                {
                    <Icon Name="IconName.AngleUp"
                          Size="IconSize.Large" />
                }
            </button>
        </h2>
        <div class="hidden @this.ClassName(" AccordionBody")">
            <div class="@this.ClassName("AccordionContent")">
                @ChildContent
            </div>
        </div>
    </div>
}
